package com.wisdytech.linkdcs.system.service.impl;

import com.wisdytech.common.constants.CommonConstants;
import com.wisdytech.linkdcs.system.dao.ISysUserDao;
import com.wisdytech.linkdcs.system.model.SysUser;
import com.wisdytech.linkdcs.system.service.IUserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service("userService")
public class UserServiceImpl implements IUserService {

	@Resource
	private ISysUserDao sysUserDao;
	
	@Override
	public SysUser getSystemUserByName(String userName) {
		
		return sysUserDao.getUserByName(userName);
	}

	@Override
	public SysUser getSystemUserByNameExcludeResources(String username) {
		SysUser u = new SysUser();
		u.setUsername(username);
		u.setDelFlag(CommonConstants.DEL_FLAG);
		return sysUserDao.selectOne(u);
	}
}
